<template>
  <div>
    <a-table
      ref="table"
      size="middle"
      bordered
      rowKey="id"
      class="table_header_blue"
      :columns="columns"
      :dataSource="dataSource"
      :pagination="false"
      :loading="loading"
    >
    </a-table>
  </div>
</template>
<script>
import columns from './indexColumns'
import { getAction } from '@/api/manage'
export default {
  name: 'shjlModal',
  // mixins: [JeecgListMixin],
  components: {},
  props: ['id'],
  data() {
    return {
      columns: columns(this),
      visible: false,
      title: '审核记录',
      loading: false,
      dataSource: [],
      url: {
        list: '/sjxmzygl/sjWorkApplyLog/queryApplyLog',
      },
    }
  },
  watch: {
    id: {
      immediate: true,
      handler(val) {
        if (val) {
          this.loadData()
        }
      },
    },
  },
  created() {},
  methods: {
    close() {
      this.visible = false
    },
    loadData() {
      this.loading = true
      this.dataSource = []
      getAction(this.url.list, { proId: this.id, type: '100' }).then((res) => {
        if (res.success) {
          this.dataSource = res.result
        } else {
          this.$message.error(res.message)
        }
        this.loading = false
      })
    },
  },
}
</script>

<style lang="less" scoped>
@import '~@assets/less/tableTheme.less';
@import '../../../css/checkAndEdit.less';

.table-header {
  margin-bottom: 10px;

  .table-title {
    font-weight: bold;
    margin-left: 15px;
  }
}
</style>
